-----------------------------------------------
-- CALC_ELITE_REDUCE_ATTRIB
-- 精英怪属性百分比降低
-- @param  monster   怪物
-- @param  attrib    属性
-- @param  baseValue 基础值

return function(monster, attrib, baseValue)
    -- 精英怪属性百分比降低
    local value = baseValue;
    local element = monster:query("element");
    local dbase = DungeonM.queryElement(element, "dbase");
    if type(dbase) == "table" and dbase["is_elite"] ~= nil and dbase["is_elite"] == 1 then
        -- 是否是精英怪
        local prop = PropM.combine(ME.user, "reduce_elite", attrib);
        if prop[3] > 0 then
            value = PropM.apply(prop, baseValue);
            monster.dbase:setTemp("elite_reduce", attrib, {["co"] = prop[3], [attrib] = value});
        else
            -- 没有削弱了，直接清除
            monster.dbase:deleteTemp("elite_reduce", attrib);
        end
    end

    return value;
end
